<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>navistore.backend.restkit.util.oauth2.Token : API documentation</title>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <link href="apidocs.css" type="text/css" rel="stylesheet" />
    
    
  </head>
  <body>
    <h1 class="class">n.b.r.u.o.Token(<span title="object">object</span>) : class documentation</h1>
    <p>
      <span id="part">Part of <a href="navistore.html">navistore</a>.<a href="navistore.backend.html">backend</a>.<a href="navistore.backend.restkit.html">restkit</a>.<a href="navistore.backend.restkit.util.html">util</a>.<a href="navistore.backend.restkit.util.oauth2.html">oauth2</a></span>
      
      <a href="classIndex.html#navistore.backend.restkit.util.oauth2.Token">View In Hierarchy</a>
    </p>
    <div>
      
    </div>
    <div>An OAuth credential used to request authorization or a protected 
resource.</p>
<p>Tokens in OAuth comprise a *key* and a *secret*. The key is included in 
requests to identify the token being used, but the secret is used only in 
the signature, to prove that the requester is who the server gave the token
to.</p>
<p>When first negotiating the authorization, the consumer asks for a 
*request token* that the live user authorizes with the service provider. 
The consumer then exchanges the request token for an *access token* that 
can be used to access protected resources.<table class="fieldTable"></table></div>

    
    
    <div id="splitTables">
      <table class="children sortable" id="id113">
  
  
<tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#__init__">__init__</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#set_callback">set_callback</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#set_verifier">set_verifier</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#get_callback_url">get_callback_url</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#to_string">to_string</a></td>
    <td><span>Returns this token as a plain string, suitable for storage.</span></td>
  </tr><tr class="staticmethod">
    
    
    <td>Static Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#from_string">from_string</a></td>
    <td><span>Deserializes a token from a string like one returned by</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="navistore.backend.restkit.util.oauth2.Token.html#__str__">__str__</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr>
  
</table>
      
      
    </div>
    
    
    

    <div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.__init__">
    
  </a>
  <a name="__init__">
    
  </a>
  <div class="functionHeader">
    
    def
    __init__(self, key, secret):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.set_callback">
    
  </a>
  <a name="set_callback">
    
  </a>
  <div class="functionHeader">
    
    def
    set_callback(self, callback):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.set_verifier">
    
  </a>
  <a name="set_verifier">
    
  </a>
  <div class="functionHeader">
    
    def
    set_verifier(self, verifier=None):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.get_callback_url">
    
  </a>
  <a name="get_callback_url">
    
  </a>
  <div class="functionHeader">
    
    def
    get_callback_url(self):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.to_string">
    
  </a>
  <a name="to_string">
    
  </a>
  <div class="functionHeader">
    
    def
    to_string(self):
    
  </div>
  <div class="functionBody">
    
    <div>Returns this token as a plain string, suitable for storage.</p>
<p>The resulting string includes the token's secret, so you should never 
send or store this string where a third party can read it.<table class="fieldTable"></table></div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.from_string">
    
  </a>
  <a name="from_string">
    
  </a>
  <div class="functionHeader">
    @staticmethod<br />
    def
    from_string(s):
    
  </div>
  <div class="functionBody">
    
    <div>Deserializes a token from a string like one returned by 
`to_string()`.<table class="fieldTable"></table></div>
  </div>
</div><div class="function">
  <a name="navistore.backend.restkit.util.oauth2.Token.__str__">
    
  </a>
  <a name="__str__">
    
  </a>
  <div class="functionHeader">
    
    def
    __str__(self):
    
  </div>
  <div class="functionBody">
    
    <div class="undocumented">Undocumented</div>
  </div>
</div>
    <address>
      <a href="index.html">API Documentation</a> for navistore, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2010-11-13 15:44:55.
    </address>
  </body>
</html>